package Servlets;

import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@WebServlet("/courseSearch")
public class courseSearch extends HttpServlet {
	private static final long serialVersionUID = 1L;


	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
	
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
		String cName = request.getParameter("courseName");
		String cSec = request.getParameter("courseSection");
		String cTime = request.getParameter("courseTimings");
		String cLoc = request.getParameter("courseLocation");
		
		System.out.println("Course Search-> "+cName+" "+cSec+" "+cTime+" "+cLoc);
	
		RequestDispatcher rd=getServletContext().getRequestDispatcher("/View/searchCourse.jsp");
		rd.forward(request, response);
	}

}
